package com.yanqu.road.logic.bussiness.player;

import com.yanqu.road.logic.bussiness.DaoHelper;
import com.yanqu.road.entity.config.sacrifice.SacrificeDetail;
import com.yanqu.road.entity.rank.UserRank;
import com.yanqu.road.entity.sacrifice.UserSacrifice;
import com.yanqu.road.entity.sacrifice.UserSacrificePatronsData;

import java.util.LinkedList;
import java.util.List;
import java.util.Map;

public class UserSacrificeBussiness {

    public static UserSacrifice getUserSacrifice(long userId) {
        return DaoHelper.getUserSacrificeDaoImpl().getUserSacrifice(userId);
    }

    public static boolean addUserSacrifice(UserSacrifice userSacrifice) {
        return DaoHelper.getUserSacrificeDaoImpl().add(userSacrifice);
    }

    public static boolean updateUserSacrifice(UserSacrifice userSacrifice) {
        return DaoHelper.getUserSacrificeDaoImpl().update(userSacrifice);
    }

    public static Map<Integer, UserSacrificePatronsData> getUserSacrificePatronsDataMap(long userId) {
        return DaoHelper.getUserSacrificePatronsDaoImpl().getUserSacrificePatronsDataMap(userId);
    }

    public static boolean addUserSacrificePatronsData(UserSacrificePatronsData userSacrificePatronsData) {
        return DaoHelper.getUserSacrificePatronsDaoImpl().add(userSacrificePatronsData);
    }

    public static boolean updateUserSacrificePatronsData(UserSacrificePatronsData userSacrificePatronsData) {
        return DaoHelper.getUserSacrificePatronsDaoImpl().update(userSacrificePatronsData);
    }

    public static LinkedList<SacrificeDetail> getSacrificeDetailList(long dateMark, int maxCount) {
        return DaoHelper.getSacrificeDetailDaoImpl().getSacrificeDetailList(dateMark, maxCount);
    }

    public static boolean addSacrificeDetail(SacrificeDetail sacrificeDetail) {
        return DaoHelper.getSacrificeDetailDaoImpl().add(sacrificeDetail);
    }

    public static boolean updateSacrificeDetail(SacrificeDetail sacrificeDetail) {
        return DaoHelper.getSacrificeDetailDaoImpl().update(sacrificeDetail);
    }

    public static LinkedList<UserRank> getSacrificeDamageRankList(int dateMark) {
        return DaoHelper.getSacrificeDamageRankDaoImpl().getSacrificeDamageRankList(dateMark);
    }

    public static boolean updateSacrificeDamageRankList(List<UserRank> rankList) {
        return DaoHelper.getSacrificeDamageRankDaoImpl().updateSacrificeDamageRankList(rankList);
    }

    public static boolean updateSacrificeDamageGetReward(UserRank userRank) {
        return DaoHelper.getSacrificeDamageRankDaoImpl().updateSacrificeDamageGetReward(userRank);
    }
}
